package com.qingfeng.system.controller;

import com.qingfeng.entity.MyResponse;
import com.qingfeng.entity.system.okms.AamsUser;
import com.qingfeng.system.service.IUserDagService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.security.Principal;
import java.util.List;

/**
 * @ProjectName TestController
 * @author qingfeng
 * @version 1.0.0
 * @Description 测试案例
 * @createTime 2021/4/3 0003 21:10
 */
@Slf4j
@RestController
@RequestMapping("test")
public class TestController {
    @Autowired
    private IUserDagService userService;
    @GetMapping("info")
    public String test(){
        return "qingfeng-server-system";
    }

    @GetMapping("currentUser")
    public Principal currentUser(Principal principal) {
        return principal;
    }



    @GetMapping("hdldag")
    public MyResponse finduser() {
        List<AamsUser> list = userService.list();
        return new MyResponse().data(list);
    }

}
